# -*- coding: utf-8 -*-
"""
Created on Tue Sep 19 19:02:11 2023

@author: 楠川之木
"""

par = [1,5,50] #存储每种硬币，从小到大排列
sum = int(input("请输入需要找的零钱:\n")) 
#从面值最大的开始遍历
i = len(par) -1
while i >= 0:
    if sum >= par[i]:
        n = int(sum // par[i])
        change = n * par[i]
        sum = int((sum - change))
        print("用了%d个%d元硬币" % (n,par[i]))
    i -= 1
